home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / mindos11.zip / DEV.H next >
C/C++ Source or Header  |  1991-03-22  |  1KB  |  42 lines

  1. /*  dev.h -- Values needed for disk device access */
  2. /*  Copyright 1991, Steven W. Harrold - All rights reserved. */
  3. /*  $Header: DEV.H_V 1.3 91/03/20 08:48:53 SWH Exp $ */
  4.  
  5. #include    <bios.h>
  6.  
  7. #define NEW_MEDIA       0x06            /* Media has changed */
  8. #define NO_MARKER       0x02            /* Address mark not found */
  9. #define NO_SECTOR       0x04            /* Sector not found */
  10.  
  11. #ifdef TURBOC
  12. #define _DISK_RESET     0
  13. #define _DISK_READ      2
  14. #define _DISK_VERIFY    4
  15. #endif
  16.  
  17. extern int Dstatus ;            /* status of most recent dev operation */
  18.  
  19. struct devdata                  /* describes the disk being accessed */
  20. {
  21.     int     d_drive ;           /* drive num; 0x0n=floppy; 0x8n=hard */
  22.     int     d_tracks ;          /* number of tracks (aka cylinders) */
  23.     int     d_heads ;           /* number of heads (aka tracks) */
  24.     int     d_sectors ;         /* number of sectors (aka records) */
  25.     int     d_partnum ;         /* partition number */
  26.     int     d_partoff ;         /* partition offset in tracks (cyls) */
  27.     int     d_interleave ;      /* interleave factor */
  28.     int     d_status ;          /* last BIOSDISK status */
  29. } ;
  30.  
  31. #define BIOSDISK(cmd)   biosdisk((cmd),drive,head,track,sector,1,buffer)
  32.  
  33. /* The biosdisk() is supplied with TurboC.
  34. */
  35. #ifdef MSC
  36. int biosdisk(int cmd,int drive,int head,int track,int sector,
  37.              int nsectors,void *buffer);
  38. #endif
  39.  
  40.  
  41. /*---eof---*/
  42.